Repository navigation
Conversation
Cards mount at /media/<user>/<LABEL> (or /run/media/<user>/<LABEL>) on Linux, one level below where the drive scan looked. It listed the empty /media/<user> directory itself instead, and an unreadable /media/root where another user's session had left a mount, both badged as fake removable drives, while the actual card never showed up. Read /proc/self/mountinfo instead: it names real mount points, gives the filesystem type (surfaced in the drive panel), and lets pseudo, network and system filesystems be filtered by type rather than by guessing from the path. Falls back to the old /Volumes,/media,/mnt scan if /proc is unavailable (some containers).
owenpkent
left a comment
There was a problem hiding this comment.
Reviewed 70c2cb8 for mount-table parsing, escaped mount points, filesystem filtering, classification, and fallback behavior.
Two actionable issues are detailed inline: the new Linux fixture breaks four tests on Windows because it serializes host-native paths, and filtering overlay filesystems before handling / drops the system volume in overlay-root environments.
Validation: all 19 volume tests pass locally on Linux. The current-head Windows CI job fails with the four path-key errors, confirmed from its logs; the Linux and macOS jobs pass. A separate synthetic mount table containing an accessible overlay root produces an empty volume list. No removable hardware was available for a live card test.
owenpkent
left a comment
There was a problem hiding this comment.
No additional actionable defect found in this incremental diff. Both earlier findings are addressed: fixture keys use POSIX normalization on Windows, and an accessible overlay root remains a candidate system volume.
Reviewed mountinfo field parsing and escapes, filesystem/path filtering, removable/network/optical classification, sysfs parent lookup, fallback behavior, root deduplication and drive-panel consumers. Storage network mounts are retained and classified; they are excluded from camera-card detection.
Validation: 20 volume tests passed and one symlink-dependent test skipped in the exact-head detached worktree on Windows. This includes the cross-platform fixture and overlay-root regressions. Current-head CI succeeds across the supported OS matrix; the diff check passes.
Limits: synthetic Linux mount tables locally, without a real Linux removable card, encrypted block device or mounted network share.
Pinned scope: declared base e01a0eb034fd0056ae4a3385b187c70ba96d2a49, merge base e01a0eb034fd0056ae4a3385b187c70ba96d2a49, head 2454dca81fdbe821c7e2e8a6888570b0c3de782a. Existing discussion and current-head checks were reviewed; no threads were resolved and no formal approval or merge is being issued.
Fixes drive detection on Linux, tested on this machine while getting offloader running here.
Problem
The Linux volume scan listed the children of
/media. Ubuntu (and most distros using udisks) mounts removable media one level deeper, at/media/<user>/<LABEL>, so:/media/<user>directory itself was listed and badged as a removable drive/media/rootshowed up too, unreadableFix
_linux_volumes()now reads/proc/self/mountinfodirectly: real mount points, actual filesystem type, and enough to filter out pseudo filesystems (tmpfs, overlay, gvfs, squashfs, ...), classify network and optical filesystems by type, and tell a removable device from a fixed one via sysfs rather than guessing from the path. The drive panel also now shows the filesystem type on Linux, matching what it already showed via GetVolumeInformationW on Windows.Falls back to the previous
/Volumes,/media,/mntscan if/procisn't available (some containers).Windows and macOS paths are untouched.
Testing
ruff checkclean.mountinfotable covering: cards under/media/<user>and/run/media/<user>, octal-escaped mount points (spaces in labels), pseudo/system mounts excluded, and drive-type classification (fixed/removable/network/optical).